const db = require("../models");
const Login = db.login;

exports.addOne = (req, res) => {
    Login.create({ user_mail: req.query.user_mail, user_passwd: req.query.user_passwd })
        .then((data) => {
            res.setHeader("Access-Control-Allow-Origin", '*')
            res.send(data);
        })
        .catch((err) => {
            res.status(500).send({
                message: err.message || "注册失败，该邮箱已注册",
            });
        });
}